Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Apr 18, 2022

Bumps fastjson from 1.2.76 to 2.0.1.

Release notes

Sourced from fastjson's releases.

fastjson 2.0.1发布

1. FASTJSON 2.0介绍

FASTJSON 2.0是FASTJSON项目的重要升级,目标是为下一个十年提供一个高性能的JSON库,同一套API支持JSON/JSONB两种协议,JSONPath是一等公民,支持全量解析和部分解析,支持Java服务端、客户端Android、大数据场景。

2. 使用前准备

2.1 Maven依赖

在fastjson 2.0中,groupId和1.x不一样,是com.alibaba.fastjson2

<dependency>
	<groupId>com.alibaba.fastjson2</groupId>
	<artifactId>fastjson2</artifactId>
	<version>2.0.1</version>
</dependency>

https://repo1.maven.org/maven2/com/alibaba/fastjson2/fastjson2/

2.2

如果原来使用fastjson 1.2.x版本,可以使用兼容包,兼容包不能保证100%兼容,请仔细测试验证,发现问题请及时反馈。

<dependency>
	<groupId>com.alibaba</groupId>
	<artifactId>fastjson</artifactId>
	<version>2.0.1</version>
</dependency>

2.2 常用类和方法

在fastjson 2.0中,package和1.x不一样,是com.alibaba.fastjson2。如果你之前用的是fastjson1,大多数情况直接更包名就即可。

package com.alibaba.fastjson2;
class JSON {
// 将字符串解析成JSONObject
static JSONObject parseObject(String str);
// 将字符串解析成JSONArray
static JSONArray parseArray(String str);
// 将字符串解析成Java对象
static T parseObject(byte[] utf8Bytes, Class&lt;T&gt; objectClass);
// 将Java对象输出成字符串
static String toJSONString(Object object);
// 将Java对象输出成UT8编码的byte[]

</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [fastjson](https://github.com/alibaba/fastjson2) from 1.2.76 to 2.0.1.
- [Release notes](https://github.com/alibaba/fastjson2/releases)
- [Commits](https://github.com/alibaba/fastjson2/commits/2.0.1)

---
updated-dependencies:
- dependency-name: com.alibaba:fastjson
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 18, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github May 2, 2022

Superseded by #30.

@dependabot dependabot bot closed this May 2, 2022
@dependabot dependabot bot deleted the dependabot/maven/com.alibaba-fastjson-2.0.1 branch May 2, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants